<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        onload = function () {
            var btn = document.getElementById("btnId");
            btn.onclick = function () {
                //location = "target.html";//指定要跳转的页面的路径
                location.href = "target.html";//指定要跳转的页面的路径
            };

            var reloadBtn = document.getElementById("reloadBtnId");
            reloadBtn.onclick = function () {
                location.reload();//页面刷新
            };
        };
    </script>
</head>
<body>
<input type="text">
<input type="button" value="跳转" id="btnId">
<input type="button" value="刷新" id="reloadBtnId">
</body>
</html>